import { createBrowserRouter } from "react-router-dom";
import App from "../App";
import Shouye from "../Shouye/Index";
import Xiaoxi from "../Xiaoxi/Index";
import My from "../My/Index";
import Login from "../Login/Index";
import Sousuo from '../sousuoyaowu'
import DoctorDetail from "../DoctorDetail/Index";
import MyFollow from "../MyFollow/Index";

export const routers = createBrowserRouter([
  {
    path: "/",
    element: <App />, // 主布局组件 - 包含底部导航栏
    children: [
      {
        index: true,
        element: <Shouye />, // 首页 - 医生列表页面
      },
      {
        path: "/shouye",
        element: <Shouye />, // 首页 - 医生列表页面（带滚动加载）
      },
      {
        path: "/xiaoxi",
        element: <Xiaoxi />, // 消息页面
      },
      {
        path: "/my",
        element: <My />, // 我的页面 - 个人中心
      },
    ],
  },
  {
    path: "/login",
    element: <Login />, // 登录页面
  },
  {
    path: "/sousuo",
    element: <Sousuo />, // 搜索页面 - 药品搜索
  },
  {
    path: "/doctor/:id",
    element: <DoctorDetail />, // 医生详情页面 - 包含关注功能
  },
  {
    path: "/my-follow",
    element: <MyFollow />, // 我的关注页面 - 关注的医生列表
  },
]);
